using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

//to be deleted.

namespace OWED.Document
{
    public class ChangePCData: ChangeAtom
    {
        String text;

        public ChangePCData(AbsolutePath tagPath, String oldtext, String newText)
        {
            path = tagPath;
            text = newText;
        }

        public String Text { get { return text; } }

        public override void  Apply(XmlDocument document)
        {//TODO:  Probably wrong.
            //we know para contains a text node as the first child
            XmlText node = (XmlText) path.getNode(document).FirstChild;
            node.Value = text;

        }

        public override void Reverse(XmlDocument document)
        {
            throw new Exception("The method or operation is not implemented.");
        }
    }
}
